<!DOCTYPE html>
<html>
<head>
<meta charset="<?php echo $cfg_soft_lang; ?>">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>课程订单记录</title>
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
<link rel="stylesheet" href="../static/web/css/admin.css">
<script src="../static/web/js/jquery.min.js"></script>
<script src="js/main.js"></script>
<script>
    //获得选中项
    function getCheckboxItem() {
      var allSel = "";
      if (document.form1.aids.value) return document.form1.aids.value;
      for (i = 0; i < document.form1.aids.length; i++) {
        if (document.form1.aids[i].checked) {
          if (allSel == "")
            allSel = document.form1.aids[i].value;
          else
            allSel = allSel + "`" + document.form1.aids[i].value;
        }
      }
      return allSel;
    }
    function ReSel() {
      for (i = 0; i < document.form1.aids.length; i++) {
        if (document.form1.aids[i].checked) document.form1.aids[i].checked = false;
        else document.form1.aids[i].checked = true;
      }
    }
    function DelSel() {
      var nid = getCheckboxItem();
      if (nid == "") {
        alert("请选择要删除的订单");
        return;
      }
      location.href = "shops_operations.php?dopost=delete&nid=" + nid;
    }
    function UpSel() {
      var nid = getCheckboxItem();
      if (nid == "") {
        alert("请选择要修改的订单");
        return;
      }
      location.href = "shops_operations.php?dopost=up&nid=" + nid;
    }
    function OkSel() {
      var nid = getCheckboxItem();
      if (nid == "") {
        alert("请选择要修改的订单");
        return;
      }
      location.href = "shops_operations.php?dopost=ok&nid=" + nid;
    }
    function PushSel() {
      var nid = getCheckboxItem();
      if (nid == "") {
        alert("请选择要修改的订单");
        return;
      }
      location.href = "shops_operations.php?dopost=push&nid=" + nid;
    }
    function OpenMyWinN(surl, w, h) {
      var pos = GetWinPos(w,h);
      window.open(surl, "popUpMyWinN", "scrollbars=yes,resizable=yes,statebar=no,width=" + w + ",height=" + h + ",left="+pos.left+", top="+pos.top);
    }
</script>
</head>
<style type="text/css">
.coolbg{padding:0 15px !important;height:24px !important;line-height:24px !important;}
.coolbg:hover{background:#333;color:#fff;}
.col-md-9{max-width:98%;overflow:hidden;margin:15px;padding:0;flex: 0 0 98%;}
.finance_condition_wrapper{float:left;width:58%;border:1px solid #cfcfcf;}
.finance_condition_wrapper .finance_condition_header{height:50px;background:#692020;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;}
.finance_condition_wrapper .finance_condition_header span{font-size:14px;color:#fff;width:30%;text-align:center;}
.finance_condition_wrapper .finance_condition_header span:last-child{border-right:none;-ms-flex:1;flex:1;}
.finance_condition_wrapper .finance_condition_content{display:-ms-flexbox;display:flex;height:100px;-ms-flex-align:center;align-items:center;box-sizing:border-box;background:#fff;}
.finance_condition_wrapper .finance_condition_content span{line-height:36px;height:36px;font-size:36px;border-right:1px solid #cfcfcf;width:30%;text-align:center;}
.finance_condition_wrapper .finance_condition_content span:last-child{border-right:none;-ms-flex:1;flex:1;}

.pagelistbox{text-align:center;padding-top:30px;padding-bottom:30px;overflow:hidden;}
.pagelistbox a{background-color:#fff;font-size:14px;display:inline-block;height:36px;line-height:36px;border:1px solid #dadada;color:#666;margin-left:5px;padding:0 20px;}
.pagelistbox a:hover{border:1px solid #ff700a;color:#fff;background-color:#ff700a;text-decoration:none;}
.pagelistbox .cpage{font-size:14px;display:inline-block;height:36px;line-height:36px;border:1px solid #ff700a;color:#fff;background-color:#ff700a;margin-left:5px;padding:0 20px;}
</style>
<body>

<!-- 订单搜索 -->
<form name="form2" method="get" action="shops_operations.php">
<table width="98%" cellpadding="1" cellspacing="1" align="center" class="mt-3 mb-3" style="display:none;">
<tr>
<td height="36">
<table cellpadding="0" cellspacing="0">
<tr>
<td width="260" align="center"><input name="buyid" type="text" id="buyid" placeholder="输入订单号" style="width:260px;margin-right:10px;height:40px;line-height:40px;"></td>
<td><button type="submit" class="btn btn-success btn-sm" style="height:40px;line-height:40px;padding:0 10px;font-size:14px;">搜索</button></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<!-- 订单搜索 End -->


<table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mb-3">
<!-- 课程金额统计 -->
<div class="col-md-9">

<!-- 本月统计 -->
<div class="finance_condition_wrapper" style="margin-right:1.6%;">
<div class="finance_condition_header"><span style="border-right:1px solid #e8e8e8;">本月课程总收入(元)</span><span style="border-right:1px solid #e8e8e8;">本月课程购买人数</span><span>历史累计总收入(元)</span></div>
<div class="finance_condition_content"><span>{dede:global.allm/}</span><span>{dede:global.nowc/}</span><span>{dede:global.all_m/}</span></div>
</div>

<!-- 上个月统计 -->
<div class="finance_condition_wrapper" style="width:40%;">
<div class="finance_condition_header" style="background:#403e3e;"><span style="width:40%;color:#fff;border-right:1px solid #e8e8e8;">上个月课程购买人数</span><span style="width:40%;color:#fff;">上个月课程总收入(元)</span></div>
<div class="finance_condition_content"><span style="width:40%;">{dede:global.oldc/}</span><span style="width:40%;">{dede:global.oldm/}</span></div>
</div>

</div>
<!-- 课程金额统计 End -->

    <tr>
      <td height="26" colspan="11" background="../static/web/img/tbg.gif">
        <table width="98%" cellspacing="0" cellpadding="0" class="table table-borderless">
          <tr>
            <td width="30%" style="padding-left:10px">课程订单管理</td>
            <td width="45%" align="right" style="padding-top:10px">
            <button type="button" onClick="location='shops_operations.php?sta=0'" class="btn btn-success btn-sm">未付款</button>
            <button type="button" onClick="location='shops_operations.php?sta=1';" class="btn btn-success btn-sm">已完成</button>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr bgcolor="#F8FCF1">
    <td align="center">选择</td>
    <td align="center">订单编号</td>
    <td align="center">购买日期</td>
    <td align="center">订单价格</td>
    <td align="center">课程名称</td>
    <td align="center">支付方式</td>
    <td align="center">状态</td>
    <td align="center">购买账号</td>
    </tr>
    <form name="form1">
      {dede:datalist empty='<tr><td colspan="11"><center>暂无内容</center></td></tr>'}
      <tr height="26" align="center" onmousemove="javascript:this.bgColor='#F8FCF1';" onmouseout="javascript:this.bgColor='#ffffff';">
      <td align="center">
      <input type='checkbox' name='aids' value='<?php echo $fields['oid']?>' class='np'></td>
      <td align="center">
      <?php echo $fields['oid'];?>
      </td>
      <td align="center">
      <?php echo GetDateTimeMk($fields['stime'])?>
      </td>
      <td align="center">
      <?php echo $fields['price']?>
      </td>
      <td align="center">
      <?php echo jjGetTypename($fields['pid'])?>
      </td>
      <td align="center">
      <?php echo GetsType($fields['paytype'])?>
      </td>
      <td align="center">
      <?php echo GetSta($fields['state'])?>
      </td>
      <td align="center">
      <?php echo GetMemberID($fields['userid'])?>
      </td>
      </tr>
      {/dede:datalist}
    </form>
    <tr>
    <td height="26" colspan="11" bgcolor="#FCFDF7" style="padding-top:10px">&nbsp;
    <button type="button" onClick="ReSel();" class="btn btn-success btn-sm">反选</button>
    <button type="button" onClick="DelSel();" class="btn btn-success btn-sm">删除</button>
    </td>
    </tr>
    <tr>
    <td height="36" colspan="11" align="center">
    <div class="pagelistbox" style="background:#fff;">
    {dede:pagelist listsize='5' /}
    </div>
    </td>
    </tr>
</table>
</body>
</html>